<%= render  :partial => "apo/navigation" %>

<div id="containerBody">

<% form_tag :action => "submit_changed_password" , :id => params[:id] do %>

    <h2> Change Password </h2>

    <% if !session[:user].admin %>
        <h3> Please enter your old password, followed by your new password twice for verification. </h3>
    <% else %>
        <h3> Please enter the desired new password twice for verification </h3>
    <% end %>

    <div class="container">

        <div class="cellRow">
            <div class="cellBlock">
                Member:
            </div>
            <div class="cellBlock">
                <b><%=h @member.full_name %></b>
            </div>
        </div>

        <div class="cellRow">
            <div class="cellBlock">
                Username:
            </div>
            <div class="cellBlock">
                <b><%=h @member.username %></b>
            </div>
        </div>

        <% if !session[:user].admin %>

            <div class="cellRow">
                <div class="cellBlock">
                    Old Password
                </div>
                <div class="cellBlock">
                    <%= password_field_tag "old_password" %>
                </div>
            </div>

        <% end %>

        <div class="cellRow">
            <div class="cellBlock">
                New Password
            </div>
            <div class="cellBlock">
                <%= password_field_tag "new_password_one" %>
            </div>
        </div>

        <div class="cellRow">
            <div class="cellBlock">
                Retype New Password
            </div>
            <div class="cellBlock">
                <%= password_field_tag "new_password_two" %>
            </div>
        </div>

        <div class="cellRow">
            <div class="cellBlock">
                &nbsp;
            </div>
        </div>

    </div>

    <%= submit_tag "Submit" %>

<% end %>

</div>
